//
//  OPMainTabBarController.m
//  OnePiece
//
//  Created by wsy on 15/10/26.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "OPMainTabBarController.h"
#import "OPMainHelperController.h"
#import "OPMainOptionalController.h"
#import "OPMainTravelNotesController.h"
#import "OPMainVideoController.h"

@interface OPMainTabBarController ()

@end

@implementation OPMainTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    OPMainTravelNotesController *travelVC = [[OPMainTravelNotesController alloc]init];
    UINavigationController *ncForTravel = [[UINavigationController alloc]initWithRootViewController:travelVC];
    ncForTravel.tabBarItem.title = @"游记";
    ncForTravel.tabBarItem.image = [[UIImage imageNamed:@"note1"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    OPMainOptionalController *themeVC = [[OPMainOptionalController alloc]init];
    UINavigationController *ncForTheme = [[UINavigationController alloc]initWithRootViewController:themeVC];
    themeVC.navigationItem.title = @"去哪";
    ncForTheme.tabBarItem.title = @"去哪";
    ncForTheme.tabBarItem.image = [[UIImage imageNamed:@"travel1"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    OPMainVideoController *videoVC = [[OPMainVideoController alloc]init];
    UINavigationController *ncForVideo = [[UINavigationController alloc]initWithRootViewController:videoVC];
    ncForVideo.tabBarItem.title = @"美食";
    ncForVideo.tabBarItem.image = [[UIImage imageNamed:@"meishi1"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    OPMainHelperController *helperVC = [[OPMainHelperController alloc]init];
    UINavigationController *ncForHelper = [[UINavigationController alloc]initWithRootViewController:helperVC];
    ncForHelper.tabBarItem.title = @"小秘";
    ncForHelper.tabBarItem.image = [[UIImage imageNamed:@"tool1"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    self.viewControllers = @[ncForTravel, ncForTheme, ncForVideo, ncForHelper];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
